
#include <iostream>
#include <cstdio>
#include <vector>

using namespace std;

class Student{
public:
	Student(string const& name=""):m_name(name){
		cout << "A : " << m_name << " : " << this << endl;
	}
	Student(Student const& that):m_name(that.m_name){
		cout << "B : " << that.m_name << " : " << &that 
			<< ", " << m_name << " : " << this << endl;
	}
	~Student(){
		cout << "C : " << m_name << " : " << this << endl;
	}
private:
	string m_name;
};

int main(){
	vector<Student> v;
	v.reserve(5);		// Init the capacity.
	v.push_back(Student("yufengguang"));
	v.push_back(Student("lisi"));
	v.push_back(Student("wangwu"));

//	v.resize(8);		// Change the size of data.

//	cout << "size : " << v.size() << endl;
//	cout << "capacity : " << v.capacity() << endl;

	getchar();

	return 0;
}
